<h1>Grids list</h1>

<table id="grids">
  <thead>
  <tr>
    <th>Name</th>
    <th>Rows</th>
    <th>Columns</th>
  </tr>
  </thead>

  <tbody>
  <% @grids.each do |grid| %>
    <tr>
      <td><%= h grid.name %></td>
      <td><%= h grid.rows %></td>
      <td><%= h grid.columns %></td>
      <td><%= link_to 'Show', grid %></td>
      <td><%= link_to 'Edit', edit_grid_path(grid) %></td>
      <td><%= link_to_function 'Delete', "confirm('#{grid_path(grid)}', 'delete')" %></td>
    </tr>
  <% end %>
  </tbody>

</table>